﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑课表</title>
<link rel="stylesheet" type="text/css" th:href="@{css/css.css}" />
<script type="text/javascript" th:src="@{js/jquery.min.js}"></script>
<script type="text/javascript">
	function setCollege_Name(){
		var college_name="";
		college_name = $("#college_id :selected").text();
		$("#college_name").attr("value",college_name);
	}
	function setClass_Name(){
		var class_name="";
		class_name = $("#class_id :selected").text();
		$("#class_name").attr("value",class_name);
	}
	function setMon_Class_Name(){
		var mon_class_name="";
		mon_class_name = $("#mon_class_id :selected").text();
		$("#mon_class_name").attr("value",mon_class_name);
	}
	function setTues_Class_Name(){
		var tues_class_name="";
		tues_class_name = $("#tues_class_id :selected").text();
		$("#tues_class_name").attr("value",tues_class_name);
	}
	function setWed_Class_Name(){
		var wed_class_name="";
		wed_class_name = $("#wed_class_id :selected").text();
		$("#wed_class_name").attr("value",wed_class_name);
	}
	function setThurs_Class_Name(){
		var thurs_class_name="";
		thurs_class_name = $("#thurs_class_id :selected").text();
		$("#thurs_class_name").attr("value",thurs_class_name);
	}
	function setFir_Class_Name(){
		var fir_class_name="";
		fir_class_name = $("#fir_class_id :selected").text();
		$("#fir_class_name").attr("value",fir_class_name);
	}
	function setSat_Class_Name(){
		var sat_class_name="";
		sat_class_name = $("#sat_class_id :selected").text();
		$("#sat_class_name").attr("value",sat_class_name);
	}
	function setSun_Class_Name(){
		var sun_class_name="";
		sun_class_name = $("#sun_class_id :selected").text();
		$("#sun_class_name").attr("value",sun_class_name);
	}
	
</script>
</head>
<body>
	<div id="pageAll">
		<div class="pageTop">
			<div class="page">
				<img src="img/coin17.png" /><span><a href="#">首页</a>&nbsp;-&nbsp;<a
					href="#">公共管理</a>&nbsp;-</span>&nbsp;意见管理
			</div>
		</div>
		<div class="page ">

			<form action="#" th:action="@{/updateTimeTable}" th:object="${timetable}" method="post">
			<div class="banneradd bor">
			<input name="id" type="hidden"  th:value="${timetable.id}" />
				<div class="baTopNo">
					<span>课表编辑</span>
				</div>
				<div class="baBody">
					<div class="bbD">
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;学院：
						<select name="college_id" id="college_id" onchange="setCollege_Name()" th:value="${timetable.college_id}">     
						  <option th:text="${timetable.college_name}"  th:value="0" >-请选择学院-</option>     
						  <option th:each="college:${colleges}" th:value="${college.id}" th:text="${college.name}" th:selected="${college.id==timetable.college_id}"></option>
						 </select>  
					</div>
					<input id="college_name" name="college_name" type="hidden" th:value="${timetable.college_name}"/>
					<div class="bbD">
						所属专业：
						<select name="class_id" id="class_id" onchange="setClass_Name()" th:value="${timetable.class_id}">     
						  <option th:text="${timetable.class_name}"  th:value="0" >-请选择专业-</option>     
						  <option th:each="oaclass:${oaclasses}" th:value="${oaclass.id}" th:text="${oaclass.name}" th:selected="${oaclass.id==timetable.class_id}"></option>
						 </select>  
					</div>
					<input id="class_name" name="class_name" type="hidden" th:value="${timetable.class_name}"/>
					<div class="bbD">
						周一科目：
						<select name="mon" id="mon_class_id" onchange="setMon_Class_Name()" th:value="${timetable.mon}">     
						  <option th:text="${timetable.mon_class_name}" th:value="0">-请选择科目-</option>     
						  <option th:each="subject:${subjects}" th:value="${subject.id}" th:text="${subject.name}" th:selected="${subject.id==timetable.mon}"></option>
						 </select>  
					</div>
					<input id="mon_class_name" name="mon_class_name" type="hidden"  th:value="${timetable.mon_class_name}"/>
					<div class="bbD">
						周二科目：
						<select name="tues" id="tues_class_id" onchange="setTues_Class_Name()" th:value="${timetable.tues}">     
						  <option th:text="${timetable.tues_class_name}" th:value="0">-请选择科目-</option>     
						  <option th:each="subject:${subjects}" th:value="${subject.id}" th:text="${subject.name}" th:selected="${subject.id == timetable.tues}"></option>
						 </select>  
					</div>
					<input id="tues_class_name" name="tues_class_name" type="hidden" th:value="${timetable.tues_class_name}"/>
					<div class="bbD">
						周三科目：
						<select name="wed" id="wed_class_id" onchange="setWed_Class_Name()" th:value="${timetable.wed}">     
						  <option th:text="${timetable.wed_class_name}" th:value="0">-请选择科目-</option>     
						  <option th:each="subject:${subjects}" th:value="${subject.id}" th:text="${subject.name}" th:selected="${subject.id == timetable.wed}"></option>
						 </select>  
					</div>
					<input id="wed_class_name" name="wed_class_name" type="hidden" th:value="${timetable.wed_class_name}"/>
					<div class="bbD">
						周四科目：
						<select name="thurs"  id="thurs_class_id" onchange="setThurs_Class_Name()" th:value="${timetable.thurs}">     
						  <option th:text="${timetable.thurs_class_name}" th:value="0">-请选择科目-</option>     
						  <option th:each="subject:${subjects}" th:value="${subject.id}" th:text="${subject.name}" th:selected="${subject.id == timetable.thurs}"></option>
						 </select>  
					</div>
					<input id="thurs_class_name" name="thurs_class_name" type="hidden" th:value="${timetable.thurs_class_name}"/>
					<div class="bbD">
						周五科目：
						<select name="fir"  id="fir_class_id" onchange="setFir_Class_Name()" th:value="${timetable.fir}">     
						  <option th:text="${timetable.fir_class_name}" th:value="0">-请选择科目-</option>     
						  <option th:each="subject:${subjects}" th:value="${subject.id}" th:text="${subject.name}" th:selected="${subject.id == timetable.fir}" ></option>
						 </select>  
					</div>
					<input id="fir_class_name" name="fir_class_name" type="hidden" th:value="${timetable.fir_class_name}"/>
					<div class="bbD">
						周六科目：
						<select name="sat"  id="sat_class_id" onchange="setSat_Class_Name()" th:value="${timetable.sat}">     
						  <option th:text="${timetable.sat_class_name}" th:value="0">-请选择科目-</option>     
						  <option th:each="subject:${subjects}" th:value="${subject.id}" th:text="${subject.name}"  th:selected="${subject.id == timetable.sat}"></option>
						 </select>  
					</div>
					<input id="sat_class_name" name="sat_class_name" type="hidden" th:value="${timetable.sat_class_name}"/>
					<div class="bbD">
						周日科目：
						<select name="sun" id="sun_class_id" onchange="setSun_Class_Name()" th:value="${timetable.sun}">     
						  <option th:text="${timetable.sun_class_name}"  th:value="0">-请选择科目-</option>     
						  <option th:each="subject:${subjects}" th:value="${subject.id}" th:text="${subject.name}" th:selected="${subject.id == timetable.sun}"></option>
						 </select>  
					</div>
					<input id="sun_class_name" name="sun_class_name" type="hidden" th:value="${timetable.sun_class_name}"/>
					<div class="bbD">
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;节数：
						<select name="part" th:value="${timetable.part}">     
						  <option th:value="0" >-请选择节数-</option>     
						  <option value="1" th:selected="${timetable.part==1}">第一节</option>     
						  <option value="2" th:selected="${timetable.part==2}">第二节</option> 
						  <option value="3" th:selected="${timetable.part==3}">第三节</option>
						  <option value="4" th:selected="${timetable.part==4}">第四节</option>
						  <option value="5" th:selected="${timetable.part==5}">第五节</option>
						  <option value="6" th:selected="${timetable.part==6}">第六节</option>
						  <option value="7" th:selected="${timetable.part==7}">第七节</option>
						  <option value="8" th:selected="${timetable.part==8}">第八节</option>
						 </select>  
					</div>
					<div class="bbD">
						<p class="bbDP">
							<input type="submit" class="btn_ok btn_yes" value="提交" >
							<a class="btn_ok btn_no" href="content_timetable">取消</a>
						</p>
					</div>
				</div>
			</div>
			</form>
			<!-- 会员注册页面样式end -->
		</div>
	</div>
</body>
</html>